package parameter

import (
	"github.com/gogf/gf/v2/frame/g"
)

type CreateMemberReq struct {
	g.Meta     `path:"/create" method:"post"`
	UserIds    string `p:"userIds"  d:"10024" v:"required#账号Id必填" dc:"账号ID"`
	ProjectId  uint   `p:"projectId"  d:"1" v:"required#项目Id必填" dc:"项目ID"`
	PositionId uint   `p:"positionId"  d:"1" v:"required#岗位Id必填" dc:"岗位ID"`
	Remark     string `p:"remark" dc:"备注"    `
	operatorId uint
}

func (s *CreateMemberReq) SetOperatorId(operatorId uint) {
	s.operatorId = operatorId
}
func (s *CreateMemberReq) GetOperatorId() uint {
	return s.operatorId
}

type CreateMemberRes struct {
}
type ListMemberSelectedReq struct {
	g.Meta    `path:"/selected" method:"post"`
	ProjectId int64 `json:"projectId" dc:"项目ID"`
}
type ListMemberSelectedRes struct {
	Detail []*GetMemberSelectedRes `json:"detail" description:"列表"`
}
type GetMemberSelectedRes struct {
	Value    int32  `json:"value"  dc:"值"`
	Name     string `json:"name"  dc:"展示名称" `
	Selected bool   `json:"selected"  dc:"选中状态" d:"false"`
}

type ListPositionReq struct {
	g.Meta `path:"/position" method:"post"`
}
type ListPositionRes struct {
	Detail []*GetPositionRes `json:"detail" description:"列表"`
}
type GetPositionRes struct {
	Id    int32  `json:"id"  dc:"职位ID"`
	Title string `json:"title"  dc:"职位名称" `
}

type ListMemberReq struct {
	g.Meta    `path:"/list" method:"post"`
	ProjectId int32  `json:"projectId"  d:"0" v:"required#项目Id必填" dc:"项目ID"`
	NickName  string `json:"nickName" dc:"成员昵称，模糊搜索"`
}

type ListMemberRes struct {
	Detail []*GetMemberRes `json:"detail" description:"列表"`
}
type GetMemberRes struct {
	MemberId         int32  `json:"memberId"  dc:"成员ID"`
	ProjectName      string `json:"projectName"  dc:"项目名称" `
	NickName         string `json:"nickName"  dc:"成员姓名"`
	EnableStatusName string `json:"enableStatusName"  dc:"状态名称" `
	PositionName     string `json:"positionName"  dc:"岗位名称" `
	Remark           string `json:"remark"  dc:"备注" `
	CreatedUserName  string `json:"createdUserName"  dc:"创建人" `
	CreatedTime      string `json:"createdTime"   dc:"创建时间"`
	UpdatedTime      string `json:"updatedTime"  dc:"修改时间" `
	UpdatedUserName  string `json:"updatedUserName"  dc:"修改人" `
}
type DeleteMemberReq struct {
	g.Meta     `path:"/delete" method:"post"`
	MemberId   uint `json:"memberId" v:"required#成员Id必填" dc:"成员Id"`
	operatorId uint
}

func (s *DeleteMemberReq) SetOperatorId(operatorId uint) {
	s.operatorId = operatorId
}
func (s *DeleteMemberReq) GetOperatorId() uint {
	return s.operatorId
}

type DeleteMemberRes struct {
}
type GetMemberComboxReq struct {
	g.Meta    `path:"/combox" method:"post"`
	ProjectId int32 `json:"projectId"  d:"0" v:"required#项目Id必填" dc:"项目ID"`
	MemberId  uint  `json:"memberId"  dc:"默认成员ID"`
}
type GetMemberComboxRes struct {
	Detail []*MemberComboxRes `json:"detail" description:"节点"`
}
type MemberComboxRes struct {
	Value    uint   `json:"value" description:"Id"`
	Name     string `json:"name" description:"显示Label"`
	Selected bool   `json:"selected" description:"显示Label" d:"false"`
}
